home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
d
/
devioustools21.dms
/
devioustools21.adf
/
utils
/
008.lzx
/
Next1.8
/
Next.doc
< prev
next >
Wrap
Text File
|
1995-11-17
|
25KB
|
652 lines
NEXT V1.8
(c) 1995 by Jürgen Klawitter
FREEWARE
NEXT is a fairly compact textreader, written in assembly. Reads also
binary files, XPK- und powerpacked files. AmigaGuide files are optionally
converted to plain ASCII. Extended functions exist for loading, analysing
and printing texts, e.g. scanning of directories with wildcards, print
with pagetitle and pagenumber, a 'smart_print' mode, word statistics and
count of strings/chars.
Search functions are very fast and display all occurrences at once on
screen. Patterns can be used. Searching can also be done by klicking
on a string. NEXT has been tested under OS 1.2 and 3.0.
Other features:
o can be made resident
o decrunches powerpacked files without powerpacker.library
o wordwrap
o block marking with mouse
o saving/printing of blocks
o when saving to an existing file text can be appended
o loading of new files by filerequester or by typing the name into the
window of NEXT, which is often faster
o reload function
o multiple windows
o window sizing by simple key press
Contents
1.General remarks 11.Print/Save
2.Start, options 12.Print with page number
3.Moving through text 13.Initializing printer
4.Messages and input 14.Switching print mode
5.Searching forward/backward 15.Changing window size by key
6.Search by mouseklick 16.Loading new file
7.Searching text in binary files 17.Line number
8.Marking a block/line 18.Display of .guide files
9.String count 19.Info
10.Word statistics 20.Delete current file
21.History
If you only want to read one of these chapters, you can use a special
function of NEXT (MSEARCH): press Ctrl and klick with left mouse button
on the number of the respective chapter.
1.General remarks
NEXT will use the system font if it allows to display at least 79 rows
of text. Otherwise topaz 8 will be taken. If the default font is smaller
than topaz 8, 80 rows will be displayed. You can override this behaviour
by options FONT and ROWS (see below).
NEXT formats the text before displaying it. That means, lines are
wrapped at word boundaries if they are too long and nonprintable chars
are converted to spaces. ESC-sequences for colour, style and printing
will not be touched. Formfeeds are left intact, too, but will be displayed
as L. Formatting is done very fast, but will take some instances
if a file is very long.
2.Start
Workbench:
==========
1. Klick on NEXT icon and doubleklick on the icon of a file or directory
(holding down the shift-key)
2. Set NEXT as the default tool in a text icon and doubleklick on that.
If you only doubleklick on the NEXT icon, a filerequester will be opended.
NEXT uses the asl-requester for OS2+, otherwise the arp-requester.
A special version of NEXT, next.rq, uses the very comfortabel filerequester
of reqtools.library V37+, (c) by Nico Francois.
Shell: > next [filename|pattern|directory] [FONT name/n] [ROWS n] [@]
======
The arguments are optional and can be given in any order. Without
arguments the filerequester will open. The same is true if you give
the name of a directory. If a wrong name is given, NEXT tries to
extract the parent directory from pathname and presents that.
Instead of the filename (NOT directory) a pattern with AmigaDos
wildcards can be used. For OS1.2/1.3 the pattern matching abilities
of NEXT are restricted. Only '*' (works like #?) and '?' can be used.
EXAMPLES:
> next docs/* ;loads the first file of directory docs. .info-
;files and subdirectories will be skipped.
> next source/n*.s ;loads the first file of directory source, whose
;name starts with 'n' and ends with '.s'.
> next docs/*.do? ;loads files which end with doc, dok or similar.
After the first file has been loaded, you can continue to scan the
directory for other files which match the given pattern, using the
function LOAD next (>).
As long as the pattern is valid, a '*' is shown in the percentage field
of the windowtitle.
OPTIONS
There are the same options for Workbench and Shell. When starting from
Workbench they must be defined as tooltypes in the icon of NEXT or
the project icon. Tooltypes in project icons override those in NEXT icon.
Options FONT and ROWS can be abbreviated with F and R respectively.
FONT name/n (WB: FONT=name/n)
"name" is the fontname WITHOUT ".font", n is the size of the font.
Example: FONT Courier/13 or F Courier/13
The font must be of fixed width. Otherwise it will not be accepted.
Fontnames should be written case sensitive, especially if you want to
use topaz/8.
ROWS n (WB: ROWS=n)
This option sets the maximal number of text rows to be displayed on
screen (default 79). This will also be the maximal print width.
Valid values are 40-105. Smaller values will be set to 40, larger ones
to 105.
@ (WB: @)
Forces NEXT to display AmigaGuide files as they are. By default they
are converted to ASCII (see chapter 18).
Options are treated in the following order:
FONT > ROWS > defaults
That means: A given font will be used, even if a given number of rows
can't be realized. ROWS has priority above default rows.
If the number of given rows is too big, NEXT tries zu realize as many
rows as possible. topaz/8 will be used if the default font is bigger.
The following table gives some examples of usable fonts and the
maximal number of rows on a standard screen with 640 pixel.
fontwidth rows font/size
--------------------------------------------------------------------
6 105 thinpaz/8 Courier/11
7 90 Courier/13
8 79 topaz/8 topaz/11 pearl/8 look/8 SanS/11
9 70 Courier/15
10 63 topaz/9
3.Moving through text
Key commands for moving are like those of common textreaders such as
Muchmore, More or PPMore, e.g., Space goes down one page, Backspace up
one page.
With cursorkeys the text can be scrolled up or down. Keys of numeric
keypad can be used, too. Most move operations can be done by different
keys. Press Help-key to get the full survey.
4.Messages and input
Starting with version 1.8, all error messages and informations are given
by requesters. They can be closed by simple keypress. Return will be
interpreted as OK, if the requester has an OK-gadget.
Some functions afford an input of strings, e.g. SEARCH. This is typed
into the line at the bottom of window. Empty input (nothing typed and
Return pressed) aborts the respective function.
Apart from printable chars following control chars are accepted:
TAB Tab key I \
ESC Esc [ \
CSI Alt-Esc Û \ displayed
Linefeed(LF) Ctrl-J J /
Formfeed(FF) Ctrl-L L /
Return(CR) Ctrl-M M /
The input line can be edited similar to shell:
BackSpace deletes char left from cursor
Del deletes char under cursor
Shift-Del deletes all chars from cursor position to the right
-> moves cursor right
<- moves cursor left
Shift -> cursor to end of string
Shift <- cursor to beginning of string
5.Searching forward/backward (SEARCH,BSEARCH/NEXT,PREVIOUS)
Strings can be searched case sensitive (cs) or case insensitive (ci).
They can contain control chars, e.g. LF. This enables searching of strings
which continue on next line or finding only words at beginning of a line.
Pattern search
==============
From V1.8 on strings to be searched may contain the '?' as wildcard.
It replaces any alphanumerical character. Input of wildcard is done
by Help-key. It is displayed with colour 2 in contrast to normal '?'.
EXAMPLE: Input is 'b
?
g'. As result bug, big, bog, bag...
will be found.
If a pattern contains nothing but wildcards NEXT will look only for
words with the same length as the pattern. (It wouldn't make much sense
to display all occurrences without this restriction.)
==============
NEXT marks all occurrences with background colour 2. Control chars in
search string are converted to visible chars (same as input).
In contrast to most textreaders NEXT marks ALL occurrences on screen,
not only the first match. This is faster and gives much better survey.
Search starts from current position (displayed text included) if a new
string has been given or if search direction changes.
Searching forward, the first match will be displayed 2 lines below top
of window (if possible). Backsearch displayes it 2 lines from bottom. So
you can see what is above/below.
Usually search goes downward after string input. But you can force
immediate backsearch by additionally pressing one of the Amiga-keys
(e.g. Amiga-s). You will be prompted by BSEARCH (cs) or bsearch (ci).
The special search abilities of NEXT may give nice effects.
EXAMPLES:
1. Please press following keys in the same order: S, TAB, Return.
;
Result: All TABs are marked (see line above).
2. Marking of spaces: Press S, Space, Return.
Press R (=Refresh) to get a normal display again.
4. Press S, Alt-Space, Return.
The image is composed of spaces with Code 160.
6.Search by mouseklick (MSEARCH)
Other occurrences of every word on screen can be simply searched by
holding down Ctrl and klicking on the first (visible) char. This is a
nice feature not offered by other textreaders. Search is case insensi-
tive and direction of search depends on the mousebutton pressed:
Ctrl-LMB (left mousebutton) -> forward search
Ctrl-RMB (right " ) -> backward search
The selected word will be inverted as long as buttons are held down.
Except the first char all others must be alphanumeric. Point, underscore?
and hyphen are treated as chars if they are placed within the word.
EXAMPLES:
klicked marked/searched
------------------------------------
Workbench: Workbench:
A600/1200 A600/1200
;comment ;comment
; comment ; comment
Nölle-Neumann Nölle-Neumann
12.5.94 12.5.94
Satzende.... Satzende....
7.Searching text in binary files (XSEARCH)
This function finds ASCII-strings in programs and other binary files.
This may be useful e.g. if you want to know which libraries, devices or
files a program needs to work.
Strings are considered as ASCII if they consist of at least 4 alpha-
numeric chars. Change of upper case to lower case may occur only at
beginning of a string, otherwise it will not be marked. There are of
course many char combinations within a program which are senseless,
but hitrate of this function is quite good.
XSEARCH starts at current position and can be continued by pressing
'X'. Backsearch is not possible.
If Shift-X is pressed, words consisting of 3 chars only can be detected.
Of course, much more 'garbage' is found in this mode.
8.Marking a block/line (MARK)
A line can be marked with Shift-RMB or Shift-LMB. The positions are
stored and indicated by special signs at start of line ( 1
for LMB, 2 for RMB). You can jump back to a marked position
by klicking in the window with the mousebutton you used for marking.
Marks can be shifted by simply klicking at another line.
Two marks define begin and end of a block, marked lines included.
The order of marks (1/2 or 2/1) is unimportant. If only one line has been
marked this line will be taken as block. A block can be printed or saved.
It is also used by the function 'Word statistics' (see below).
Marks can be removed by pressing Shift-Del.
9.String count (COUNT)
This function counts all occurrences of a string or a single char within
current file. With 'C' count is case insensitive, with Shift-C case
sensitive. The result of count is displayed in a requester. The title
shows wether count was ci or cs.
A counted string can also be searched afterwards with 'N' (NEXT) or
'P' (PREVIOUS). On the other hand a previously searched string can be
counted by pressing Amiga-C. The mode (cs/ci) will be the same.
If the count string is a pattern consisting of ??? only the number of
words having the same length will be reported, e.g. "word[3] found 34
times". [3] indicates that length was 3 chars.
The count function is mainly for analysing texts. You can also use it
to check whether a certain string occurs without leaving current text
position.
10.Word statistics (COUNT words)
This function is started with 'W'. It counts the words in whole text
or block (if defined). Words which are separated by a hyphen at lineend
are recognized as ONE word. The result is presented by requester:
The first line shows total number of words and average word length.
The table below presents the occurring lengths, number of words (n) with
same length and portion of words with same length (%) in text. Maximal
word length is 30. Longer words (occur very rarely) will be added to
length 30.
Word definition is the same as explained in chapter 6.
EXAMPLES: print/save 2 words
Next.doc 1 word
A-Z 1 word
A - Z 2 words
4711 1 word
11.Print/Save (PRINT)
This function saves the text or part of it to PRT: or a file. Pressing
Shift-P will save the whole file, pressing '*' will save the currently
marked block or the text on screen (if no block has been marked).
NEXT checks if printer is online (for parallel port only). If printer
is online PRT: will be the default output, else you have to type the
filename you want to save to. 'PRT:' can be replaced by a filename if
you don't want to print.
If the file you want to save to already exists, you'll be asked whether
it should be overwritten or whether text should be appended. Press 'O'
to overwrite or 'A' to append. Any other key will abort.
The append mode may be useful if you only want to save some important
parts of a large text file.
While printing NEXT takes the page length saved in printer settings and
sends a formfeed to the printer after each page (except last page).
This is NOT the case if the text already contains formfeeds or if
output goes to a file.
12.Print with page number
If you want to print/save with page number and a title line on each page
press Amiga-P or Amiga-* (for block). You'll be asked for the text of
the title line. Default is the filename, which can be taken over by
Return. After that you'll be asked for page length, which must be at
least 3 lines. Default is length in printer settings.
After page length has been stored, NEXT calculates the number of pages
for print and shows it in window title.
The tile line looks like this by default:
Next.dok 1
Here comes the first line of text...
NEW: If "book_mode" ist ON (press '"') the head line of pages with odd
number will be inverted. The page number appears left hand, the title
string right hand. Thus, numbering is like that of a book.
Modifying page header
=====================
1. Empty input for title text will cause NEXT to print without title
line but with the page length you typed. So you can use other page
lengths than default length.
2. If you only type one or more spaces as title text, title header will
be filled with spaces but pagenumbers will be printed.
3. You can type ESC-Sequences in front of title text. This will modify
the style of title text or influence the whole print, depending
on the ESC-sequences given. For example <ESC>[0;1m suppresses
underlined and forces bold style. All ESC-sequences ending with 'm'
will infuence the style of title line only, others influence the whole
print. Use the manual or press Shift-Help to get more informations.
In contrast to normal print mode all formfeeds within current text will
be replaced by linefeeds when printing with pageheader. This is necessary
because new formfeeds are set according the page length you chose.
13.Initializing printer (INIT printer)
After pressing '=' NEXT will try to initialize your printer according
to printer settings. Printer must be online.
This function may be useful if printer was switched off for some time
or after aborting a print.
14.Switching print mode (SMART +/-)
With '!' can be toggled between two print modes:
1. smart_print
2. normal print (with constant pagelength)
After switching the windowtitle shows the print mode that will be active
when printing the next time.
smart_print tries to be intelligent and varies the pagelength a bit
according to structure of text. That means:
If at pageend only one line of a paragraph is left that normally would
be printed on next page, it will be printed on the same page.
If at end of page the first lines of a new paragraph or a heading appear,
they will be printed on the next page. Thus, a printed page may be 1 line
(max.) longer than defined by printer prefs or input. It may also be
several lines shorter.
The smart_print mode is DEFAULT, because it gives the better results
in most cases. Minimal pagelength for this mode is 11 lines. For shorter
pages the normal print mode will be used.
HINT: Print a file with pagetitle and pagenumbers to ram:test first,
load ram:test and look at the result. Then print it to PRT: if
all is O.K. Use Shift-P (NOT Amiga-P) this time.
15.Changing windowsize by key (SIZE window)
Pressing F1/F2 keys changes size of window. 3 sizes are available:
maximal, minimal and middle. F1 toggles between min. and max. size,
F2 between middle and max..
By default middle size is half as high as maximal, but can easily be
changed by dragging the size gadget. NEXT remembers the new size und
will use it on next occasion.
16.Loading new file (LOAD/RELOAD)
NEXT offers 5 variants to load a new file:
1. LOAD filereq (press L):
Opens the filerequester and presents the directory of current file.
2. LOAD by hand (Shift-L):
Type the complete name of directory or file wanted at the bottomline
of window, where a prompt will appear. If the name contains spaces,
you must place it in "".
You can also give a pattern instead of filename and use the same
options as shell commandline.
3. LOAD newwin (Amiga-L):
Input as variant 2. NEXT will create a new process which opens its own
window or a filerequester if no filename has been given.
Empty inputs are ignored.
4. RELOAD prev (<):
Enables you to load a file again which already had been viewed during
a session. NEXT saves the names of previously loaded files into a
buffer of 400 bytes. If size of buffer is not sufficient elder names
are replaced by newer ones.
After pressing '>' a small window which presents all names saved
will open. You can select a name doubleklicking or by moving through
names with cursorkeys (Up/Down) and finally pressing Return.
If nothing has been selected, Return aborts this function.
ESC-key and closegadget can be used, too.
5. LOAD next (>):
Loads next file within directory of current file. Which one will be
loaded depends on how the files are arranged on disk. Its NOT in
alphabethical order!
If a pattern is active (* in front of percentage) only file which
match this pattern will be loaded (if present). By repeatedly pressing
'>' you can view all files in the directory. .info-files will be
skipped. The message "No more files! Continue?" will appear at end
of directory. Press Return or klick on OK-gadget to continue.
In this case NEXT will scan the directory from beginning, this time
without comparing with pattern.
17.Line number (SHOW line)
After pressing Alt-MB (left or right) the line at mouse position will
be inverted and the line number is displayed. You can press Amiga-Alt, too.
18.Display of .guide files (GUIDE +/-)
By default (flag strip_guide ON) NEXT converts AmigaGuide files to ASCII
so that they can be read like normal text files. All special instructions
(like @NODE) are stripped or replaced by equivalent ESC-sequences.
End of @NODES is marked by '#' at the left border. Links are shown with
colour 2.
You can inhibit conversion at start by option @, later on by toggling
the flag with '@' or '`' (~-key). If the current file is a .guide file,
it will be immediatly loaded again and displayed in the new mode.
Converted .guide files can be saved or printed. They are shorter than
the originals.
19.Info
After pressing 'I' a requester appears with following informations:
- date of creation/last change of file (OS2+ or arp.lib necessary)
- protection bits
- information if crunched and name of cruncher (Powerpacker V2.x-4,
PPData, Imploder 3/4, XPK compressor)
- bytes stripped by conversion if current file is as .guide file
- :filenote
- number of lines and text width (longest line)
- number of lines and size of block if marked
- state of modes smart_print, book_mode, strip_guide (+=ON)
- current pattern for directory scan
20.Delete current file (DELETE file)
If you decide that the currently displayed file is no longer needed,
you can delete it by pressing Amiga-Del. You will be asked whether it
is really to be deleted. Press OK-gadget to confirm. The deleted file
will stay in memory, and you can undo deleting by saving it again.
But due to formatting there may be slight differences to original file.
IMPORTANT! NEXT doesn't delete binary files and text files which are
write or delete protected.
21.History
V1.8
====
- XPK support (+400 bytes)
- pat?ern search, search of words with given length (+600)
- Word count expanded to Word statistics (+340 )
- new DELETE function (+340)
- book_mode for prints with page numbers (+160)
- most error messages and informations now by requester, no longer
at bottom line
- NEXT no longer terminates abruptly after out-of-memory messages
or read errors. You will be asked whether to continue or to quit.
- ROWS option can now be used when loading next file
- CacheClearU() called before CreateProc(). Should prevent a crash
with 68040 CPU.
V1.7
====
- RELOAD with own window
- wildcards can be used in filename for loading
- conversion of .guide files to readable ASCII-text
- FONT option can be used when loading next file
- more Information by Info: protectionbits, actual pattern, date of
file under OS1.2/1.3 with arp.lib
- cosmetic: marks of search function now with
colour 2
,
message TOP , block marks better visible, invisible chars
in input strings (LF,TAB,ESC...) now converted to visible chars.
---------------------------------------------------------------------------
Many thanks to
- Nico Francois for publishing his decrunch routine
- Charlie Gibbs for A68k. NEXT has been assembled with it.
A really good and safe program that offers many possibilties to
the programmer
- Matt Dillon for DME und dlink (better and faster than Blink)
- Hajo Stengert and Andreas Neumann for betatesting and valuable
suggestions
Bug reports and suggestions may be sent to following address:
Jürgen Klawitter
Marschnerstr. 22
12203 Berlin